package cn.itsource.pethome.detp.controller;

import cn.itsource.pethome.detp.domian.Employee;
import cn.itsource.pethome.detp.service.IEmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/employee")
@Api(value = "员工的API",description="员工相关的CRUD功能")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    @ApiOperation(value = "查询所有的员没有分页")
    @GetMapping
    public List<Employee> employees(){
        return employeeService.findAll(null);
    }
}
